try:
	from iolib.x import input, output;
except ImportError:
	try:
		from iolib.win import input, output;
	except ImportError:
		from iolib.dump import input, output;
from iolib.base import controller;
import math, time;

ctl = controller(input,output);

resolution = ctl.output.resolution();
print 'resolution:',resolution;

def circle():
	mindim = min(resolution[0],resolution[1]);
	offx = int(round((resolution[0]-mindim)/2));
	offy = int(round((resolution[1]-mindim)/2));
	amp = int(round(mindim/2));
	t = 0;
	while True:
		t = (t+0.01)%360;
		r = t*math.pi/180;
		ctl.input.warp(offx+amp+amp*math.cos(t),offy+amp+amp*math.sin(t));
		time.sleep(0.01);

if __name__ == '__main__':
	circle();
